package router

import (
	"git.huoys.com/block_chain/mall/internal/shop/service"
	"github.com/gin-gonic/gin"
)

func Routers(s service.ShopService, e *gin.Engine) {
	var dy = NewShopHandler(s)
	userApi := e.Group("/shop")
	userApi.POST("/goods/add_class", dy.AddClass)
	userApi.POST("/goods/add", dy.AddGood)
	userApi.POST("/goods/del", dy.DelGood)
	userApi.POST("/goods/update", dy.SetGood)
	userApi.POST("/goods/get_by_class", dy.GetGoodByClass)
	userApi.POST("/goods/get_by_sorting", dy.GetGoodSByClassSorting)
	userApi.POST("/goods/get_user_goods", dy.GetUserGoods)
	userApi.POST("/goods/get", dy.GetGoodInfo)
	userApi.POST("/goods/img_upload", dy.UploadGoodImg)
	userApi.POST("/goods/img_del", dy.DelGoodImg)
	userApi.POST("/order/create", dy.AddOrder)
	userApi.POST("/order/get_list", dy.GetOrderList)
	userApi.POST("/order/get", dy.GetOrder)
}
